<?php

declare(strict_types=1);

namespace App\Notice\Service;

use App\Notice\Contract\DataServiceInterface;
use App\Notice\Contract\NoticeServiceInterface;
use Hyperf\Di\Annotation\Inject;
use Hyperf\RpcServer\Annotation\RpcService;

#[RpcService(
    name: 'NoticeService',
    server: 'jsonrpc-http',
    protocol: 'jsonrpc-http',
    publishTo: 'nacos'
)]
class NoticeService implements NoticeServiceInterface
{
    #[Inject]
    protected DataServiceInterface $dataService;

    public function getNotice2Data(): array
    {
        return $this->dataService->getCampuses(['requestId' => uniqid()]);
    }
}
